<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Man Page Generation (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="Man Page Generation (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="Man Page Generation (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Documentation.html" rel="up" title="Documentation">
<link href="Miscellaneous-Docs.html" rel="next" title="Miscellaneous Docs">
<link href="Texinfo-Manuals.html" rel="prev" title="Texinfo Manuals">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en">
<div class="subsubsection-level-extent" id="Man-Page-Generation">
<div class="nav-panel">
<p>
Next: <a href="Miscellaneous-Docs.html" accesskey="n" rel="next">Miscellaneous Documentation</a>, Previous: <a href="Texinfo-Manuals.html" accesskey="p" rel="prev">Texinfo Manuals</a>, Up: <a href="Documentation.html" accesskey="u" rel="up">Building Documentation</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsubsection" id="Man-Page-Generation-1"><span>6.3.7.2 Man Page Generation<a class="copiable-link" href="#Man-Page-Generation-1"> &para;</a></span></h4>

<p>Because of user demand, in addition to full Texinfo manuals, man pages
are provided which contain extracts from those manuals.  These man
pages are generated from the Texinfo manuals using
<samp class="file">contrib/texi2pod.pl</samp> and <code class="command">pod2man</code>.  (The man page for
<code class="command">g++</code>, <samp class="file">cp/g++.1</samp>, just contains a &lsquo;<samp class="samp">.so</samp>&rsquo; reference
to <samp class="file">gcc.1</samp>, but all the other man pages are generated from
Texinfo manuals.)
</p>
<p>Because many systems may not have the necessary tools installed to
generate the man pages, they are only generated if the
<samp class="file">configure</samp> script detects that recent enough tools are
installed, and the Makefiles allow generating man pages to fail
without aborting the build.  Man pages are also included in release
distributions.  They are generated in the source directory.
</p>
<p>Magic comments in Texinfo files starting &lsquo;<samp class="samp">@c man</samp>&rsquo; control what
parts of a Texinfo file go into a man page.  Only a subset of Texinfo
is supported by <samp class="file">texi2pod.pl</samp>, and it may be necessary to add
support for more Texinfo features to this script when generating new
man pages.  To improve the man page output, some special Texinfo
macros are provided in <samp class="file">doc/include/gcc-common.texi</samp> which
<samp class="file">texi2pod.pl</samp> understands:
</p>
<dl class="table">
<dt><code class="code">@gcctabopt</code></dt>
<dd><p>Use in the form &lsquo;<samp class="samp">@table @gcctabopt</samp>&rsquo; for tables of options,
where for printed output the effect of &lsquo;<samp class="samp">@code</samp>&rsquo; is better than
that of &lsquo;<samp class="samp">@option</samp>&rsquo; but for man page output a different effect is
wanted.
</p></dd>
<dt><code class="code">@gccoptlist</code></dt>
<dd><p>Use for summary lists of options in manuals.
</p></dd>
</dl>

<p>FIXME: describe the <samp class="file">texi2pod.pl</samp> input language and magic
comments in more detail.
</p>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Miscellaneous-Docs.html">Miscellaneous Documentation</a>, Previous: <a href="Texinfo-Manuals.html">Texinfo Manuals</a>, Up: <a href="Documentation.html">Building Documentation</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
